home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 4
/
FM Towns Free Software Collection 4 - Disc 1.iso
/
data
/
fmgraph
/
g_oval.c
< prev
next >
Wrap
Text File
|
1991-10-18
|
692b
|
39 lines
#include <stdio.h>
#include <dos.h>
struct OVAL {
unsigned type;
int cx,cy,dx,nul1,nul2,dy;
};
extern unsigned char gds_fshift;
extern unsigned gds_wrkoff;
extern unsigned gds_wrkseg;
int g_oval(int x,int y,int rx,int ry)
{
union REGS reg;
struct SREGS seg;
struct {
unsigned len;
struct OVAL ovl;
} gdata;
segread(&seg);
reg.h.ah=gds_fshift+0x0f;
reg.x.di=(unsigned)&gdata;
seg.ds=seg.ss;
gdata.len=14;
gdata.ovl.type=0x422c;
gdata.ovl.cx=x;
gdata.ovl.cy=y;
gdata.ovl.dx=rx;
gdata.ovl.nul1=0;
gdata.ovl.nul2=0;
gdata.ovl.dy=ry;
reg.x.bx=gds_wrkoff;
seg.es=gds_wrkseg;
int86x(0x92,®,®,&seg);
return (int)reg.h.ah;
}